package dao

import (
	"yk/global"
	"yk/internal/model"
)

func GetListCourse(id uint) []*model.Course {
	var course []*model.Course
	if err := global.DB.Where("id = ?", id).Find(&course).Error; err != nil {
		return []*model.Course{}
	}
	return course
}
func GetListVideoId(videoId uint) []*model.Video {
	var video []*model.Video
	if err := global.DB.Where("id = ?", videoId).Find(&video).Error; err != nil {
		return []*model.Video{}
	}
	return video
}
